package engine.graphics.shader
{
	import away3d.core.managers.*;
	import engine.core.*;
	import flash.display3D.*;
	import flash.utils.*;
	
	public class RxShaderProgram
	{
		private var m_vertexShader:RxVertexShader;
		private var m_fragmentShader:RxFragmentShader;
		private var m_shaderProgram:Program3D;
		private var m_onCompleteFunc:Function;
		private var m_fragmentShaderURL:String;
		private var m_context:Context3D;
		
		public function RxShaderProgram()
		{
			this.m_vertexShader = null;
			this.m_fragmentShader = null;
			this.m_shaderProgram = null;
			this.m_onCompleteFunc = null;
		}
		
		public function SetShaderCode(param1:Context3D, param2:String, param3:String) : void
		{
			var _loc_4:* = new RxVertexShader();
			var _loc_5:* = new RxFragmentShader();
			_loc_4.Compile(param2);
			_loc_5.Compile(param3);
			this.SetShaders(param1, _loc_4, _loc_5);
		}
		
		public function SetShaders(param1:Context3D, param2:RxVertexShader, param3:RxFragmentShader) : void
		{
			this.m_vertexShader = param2;
			this.m_fragmentShader = param3;
			this.m_shaderProgram = param1.createProgram();
			this.m_shaderProgram.upload(this.m_vertexShader.GetMicrocode(), this.m_fragmentShader.GetMicrocode());
		}
	}
}